/*
 * @Author: your name
 * @Date: 2020-02-22 14:53:54
 * @LastEditors: komons
 * @LastEditTime: 2020-03-11 20:54:38
 * @Description:
 * @FilePath: \form-builderc:\Komons\学习\visualization\src\utils\sayHelloUtils.js
 */
const WordList = {
  zs:
    "美好的一天开始了，每天给自己一个希望，试着不为明天而苦恼，不为昨天而叹息，只为今天更美好。",
  sw:
    "朝着一个目标不停的向前，不断努力的付出，哪怕你现在的人生是从零开始，你都可以做得到。早安！让梦想照进现实，才是当下最应该做的事情。",
  xw:
    "放下繁忙工作，抛弃抑郁心情，品一盏香茗，听一段音乐，收我一份祝福，放松身心劳逸结合才能事半功倍。",
  bw:
    "最困难的时刻也许就是拐点的开始，改变一下思维方式就可能迎来转机。以平常心看世界，花开花谢都是风景。晚安，朋友。",
  sy:
    "劝烦恼打个小盹，让愉悦冒个小泡;让痛苦小憩歇会儿，让愉悦接连赛跑;哄晦气睡个长觉，等好运悄悄来到。明天是崭新的一天!"
};

export function getStringByTime() {
  const date = new Date();
  let one = "";
  let time = "";
  const hours = date.getHours();
  if (hours < 6) {
    one = WordList.sy;
    time = "夜深了";
  } else if (hours < 9) {
    time = "早上好";
    one = WordList.zs;
  } else if (hours < 12) {
    time = "上午好";
    one = WordList.sw;
  } else if (hours < 18) {
    time = "下午好";
    one = WordList.xw;
  } else if (hours < 21) {
    time = "晚上好";
    one = WordList.bw;
  } else {
    time = "夜深了";
    one = WordList.sy;
  }
  return {
    one,
    time
  };
}
